package org.thanos.demo.model;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.util.Date;
import java.util.StringJoiner;

@Document(indexName = "world")
public class Customer implements Serializable {

    @Id
    private Long id;

    @Field(type = FieldType.Keyword)
    private String name;

    @Field(type = FieldType.Keyword)
    private String uuid;

    @Field(type = FieldType.Long)
    private Long createTime;

    public Long getId() {
        return id;
    }

    public Customer setId(Long id) {
        this.id = id;
        return this;
    }

    public String getName() {
        return name;
    }

    public Customer setName(String name) {
        this.name = name;
        return this;
    }

    public String getUuid() {
        return uuid;
    }

    public Customer setUuid(String uuid) {
        this.uuid = uuid;
        return this;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public Customer setCreateTime(Long createTime) {
        this.createTime = createTime;
        return this;
    }

    @Override
    public String toString() {
        return "Customer{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", uuid='" + uuid + '\'' +
                ", createTime=" + createTime +
                '}';
    }
}
